﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Config.Enum;
using PaymentBLL;
using WebTriple7.Class;

namespace WebTriple7.Master
{
    public partial class GoPlay : System.Web.UI.MasterPage
    {
        public double Au = 0;
        public double Ag= 0;
        public int Vcoin = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
             if(!Utils.UserUtils.IsLogin)
                Response.Redirect("~/Pages/RedirectPage.aspx?playOn=go-vn");
            lblDisplayAcc.Text = Utils.UserUtils.FullName;

            var ctr = new CtrAccount();
            var info = ctr.SelectAccountInfo(Utils.UserUtils.AccountId);
            Au = info.Au;
            Ag = info.Ag;

            var payment = new GateWayPayment(GateWay.Ebank);
            var blance = payment.GetBlance();
            Vcoin = blance.Data;
        }

        protected void btnLogout_Click(object sender, EventArgs e)
        {
            AccountSession.Logout();
            Response.Redirect("~/Pages/RedirectPage.aspx?playOn=go-vn");
        }
    }
}